export enum WebSocketEvents {
  CONNECTION = 'connection',
  DISCONNECT = 'disconnect',
  ERROR = 'error',
  CHAT_MESSAGE = 'chat:message',
  JOIN_ROOM = 'chat:join_room',
  LEAVE_ROOM = 'chat:leave_room',
  TYPING_START = 'chat:typing_start',
  TYPING_STOP = 'chat:typing_stop',
  PING = 'system:ping',
  PONG = 'system:pong'
}

export interface ClientMessage<T = unknown> {
  event: string;
  data: T;
  requestId?: string;
  timestamp: number;
}

export interface ServerMessage<T = unknown> {
  event: string;
  data?: T;
  error?: string;
  requestId?: string;
  timestamp: number;
}

export interface UserSession {
  userId: string;
  username: string;
  connectedAt: number;
  lastActivity: number;
}

export interface Room {
  id: string;
  name: string;
  createdAt: number;
  memberIds: string[];
  maxParticipants?: number;
}
